package com.itheima.dao;

import com.itheima.pojo.Log;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LogMapper {

    @Select("select * from log order by operate_time desc")
    List<Log> getAll();

    @Insert("insert into log(operate_emp_id,operate_time,class_name,method_name,method_params,return_value,cost_time,operate_emp_name)" +
            "values(#{operateEmpId},#{operateTime},#{className},#{methodName},#{methodParams},#{returnValue},#{costTime},#{operateEmpName})")
    int insert(Log log);
}
